package com.force.provider.helper;

import com.sforce.soap.partner.sobject.SObject;

public class SObjectHelper {
	
	public static String toStringValue (SObject so , String field){
		Object value = so.getField(field);
		return ( value != null  ) ? value.toString()  : ""; 
	}

	public static Double getDoubleValue (SObject so , String field){
		Object value = so.getField(field);
		return ( value != null  ) ? Double.valueOf( value.toString() )  : 0.0; 
	}

	public static Boolean getBooleanValue (SObject so , String field){
		Object value = so.getField(field);
		return ( value != null  ) ? Boolean.valueOf( value.toString() )  : null; 
	}
	

}
